package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sc.nft.entity.ActivityBasics;
import com.sc.nft.entity.dto.ActivationRecordDTO;
import com.sc.nft.entity.vo.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * (ActivityBasics)表数据库访问层
 *
 * @author 王伟成
 * @since 2023-09-12 16:33:45
 */
public interface ActivityBasicsMapper extends BaseMapper<ActivityBasics> {

    /**
     * 根据活动类型查询分页信息
     * @param mp
     * @param type
     * @return
     */
    Page<ActivityBasicsVO> activityBasics(Page mp,@Param("type")Integer type);

    /**
     * 获取需要开奖的数据
     * @param type
     * @return
     */
    List<ActivityBasics> getLotteryDataByType(@Param("type") int type);
    IPage<ActivityRecordVO> activityRecord(Page page);

    MyNumberVO myNumber(@Param("id") Long id);
    IPage<ActivationRecordVO> activationRecord(@Param("mp") Page mp, @Param("activationRecordDTO") ActivationRecordDTO activationRecordDTO);

    /**
     * 读取当前所上架的活动列表
     * @return
     */
    List<ActivityBasicsListVO> activityBasicsList();

}
